
<?php include_once 'common/header.php';  ?>
<?php 
	$borrow_check = array(0=>'未检查',1=>'数据已检查');
?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once 'common/borrow_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
	    <div class="admin_right_title"><strong>贷款管理</strong> >> 发标待审</div>
		<div class="admin_borrow">
			<div class="admin_borrow_title">
				<h2><?php if($borrow['thumbnail']){?><img width="60" height="60" src="/<?php echo BORROW_IMG;?>/<?php echo $borrow['thumbnail'];?>" width="60" height="60"  /><?php }?> <?php echo $borrow['title'];?></h2>
				<ul> 
					<li class="admin_borrow_bg">借款人</li> 
					<li><?php echo $borrow['username'];?></li> 
					<li class="admin_borrow_bg">标种</li> 
					<li><font><?php echo $borrow_type[$borrow['ftype']];?></font></li> 
					<li class="admin_borrow_bg">期限</li> 
					<li><?php echo $borrow['time_limit'].'个月';?></li> 
					<li class="admin_borrow_bg">金额</li> 
					<li><font><?php echo number_format($borrow['account'],2);?></font></li> 
					<li class="admin_borrow_bg">利率</li> 
					<li class="b r"><font><?php echo $borrow['apr'];?>%</font></li> 
					
					
					
					<li class="admin_borrow_bg">最小投标金额</li> 
					<li><?php echo number_format($borrow['lowest_account'],2);?>元</li> 
					<li class="admin_borrow_bg">最大投标金额</li> 
					<li><?php echo number_format($borrow['most_account'],2);?>元</li> 
					<li class="admin_borrow_bg">是否奖励</li> 
					<li><?php if($borrow['award'] == 2){?>是，<?php }else{?>不奖励<?php }?> <?php if($borrow['award'] == 2){?>奖励比例：<font><?php echo $borrow['funds'];?>%</font><?php }?></li> 
					<li class="admin_borrow_bg">状态</li> 
					<li><font style="color:blue"><?php echo $borrow_status[$borrow['fstatus']];?></font></li> 
					<li class="admin_borrow_bg">还款方式</li> 
					<li class="b r"><?php echo $borrow_style[$borrow['style']];?></li> 					
				</ul>	
			</div>	
			
			<div class="admin_borrow_title" style="margin: 10px 0;">
				<h2>信息概述</h2>
				<div class="borrow_content_wrap">
					<h3>项目概述</h3>
					<p><?php echo $borrow['content'];?></p>
					<h3>融资用途</h3>
					<p><?php echo $borrow['fuse_name'];?></p>
					<h3>还款来源：</h3>
					<p><?php echo $borrow['repay_from'];?></p>
					<h3>风控措施：</h3>
					<p><?php echo $borrow['risk_manage'];?></p>
					
				</div>
			</div>
			
			<div class="admin_borrow_title" style="margin: 10px 0;">
				<h2>资料证明信息</h2>
				<div class="borrow_content_wrap">
					<table border="0" cellspacing="1" cellpadding="0" bgcolor="#dcdcdc" width="100%">
						<tr style="color: #636363;">
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>ID</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户名</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>真实姓名</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>资料类型</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>图片</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>状态</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>获得积分</strong></td>
							<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>简介</strong></td>
						</tr>
						<?php foreach($list as $val){?>
						<tr>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $val['id'];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $userinfo['username'];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $userinfo['realname'];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $type_list[$val['type_id']];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><a
								href="/<?php echo $val['litpic']?>" target="_blank"><img
								style="width: 60px; height: 30px;" src="/<?php echo $val['litpic']?>"
								alt="<?php echo $val['name']?>" /></a></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $status_list[$val['fstatus']];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $val['jifen'];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $val['content'];?></td>
							<td height="35" align="center" valign="middle" bgcolor="#FFFFFF">
							</td>
						</tr>
						<?php }?>
					</table>
				</div>
			</div>	
			
			<div class="admin_borrow_title" style="margin: 10px 0;">
				<h2>审核</h2>
				<div class="borrow_content_wrap">
					<input type="hidden" id="borrow_id" name="borrow_id" value="<?php echo $borrow['id'];?>" />
					<h3>状态<input type="radio" name="fstatus" id="fstatus" value="1" checked="checked" />审核通过 <input type="radio" name="fstatus" id="fstatus" value="2" />审核不通过</h3>
					<h3>作为新手体验标：<input type="checkbox" name="is_mjb" value="1">设为新手标</h3>
                    <h3>评审决议：</h3>
					<p style="margin-left:40px;">
						<textarea rows="8" cols="100" id="repayment_remark" name="repayment_remark"><?php echo trim($borrow['verify_remark']);?></textarea>
					</p>
					<div class="payment_btm">
					  <input type="button" onclick="borrow_submit();" value="提  交" class="btn_b" />
					</div>
				</div>
			</div>
			
			
		</div>

<!-- Admin_Right End -->
    </div>
</div>

<script type="text/javascript">
function borrow_submit(){
	$.ajax({
		type: "POST",
		url: "/ychadmin/borrow/verify/",
		data: "id="+$('#borrow_id').val()+"&fstatus="+$('input[name="fstatus"]:checked').val()+"&verify_remark="+$('#repayment_remark').val()+"&is_mjb="+$('input[name="is_mjb"]:checked').val(),
		success: function(msg){
	        $("#dialog" ).dialog();
	        if(msg == 1){
	        	$("#msg").html("操作成功！");
	        }else{
				$("#msg").html(msg);
	        }
			setTimeout(function(){
				window.close();
			},3000);
		},
		dataType: "text"
	});
}
</script>
<div id="dialog" title="系统提示" style="display:none"><p id="msg" style="text-align:center"></p></div>
</body>
</html>
